Philip Kaludercic [Wed, 22 Dec 2021 23:38:28 +0000 (00:38 +0100)]
Fix wrong-type-argument
* message.el (message-update-smtp-method-header): Only Use address
part of mail-extract-address-component.
Philip Kaludercic [Sun, 19 Dec 2021 21:53:59 +0000 (22:53 +0100)]
Allow automatic X-Message-SMTP-Method header insertion
* message.el (message-server-alist): Add user option
(message-update-smtp-method-header): Add function
(message-send): Call message-update-smtp-method-header
* doc/misc/message.texi (Sending Variables): Document
message-server-alist
* etc/NEWS: Add news entry
Stefan Kangas [Wed, 22 Dec 2021 21:40:51 +0000 (22:40 +0100)]
Fix compile time error in a pcase test
* test/lisp/emacs-lisp/pcase-tests.el (pcase-tests-cl-type): Fix test.
Stefan Kangas [Wed, 22 Dec 2021 21:26:46 +0000 (22:26 +0100)]
Use defvar-keymap in minibuffer.el
* lisp/minibuffer.el (completion-in-region-mode-map)
(minibuffer-local-completion-map)
(minibuffer-local-must-match-map)
(minibuffer-local-filename-completion-map)
(minibuffer-local-ns-map, minibuffer-inactive-mode-map): Use
defvar-keymap.
Stefan Kangas [Wed, 22 Dec 2021 21:15:57 +0000 (22:15 +0100)]
Make substitute-command-keys test less brittle
* test/lisp/help-tests.el (help-tests--test-keymap): New keymap
variable.
(help-tests-substitute-command-keys/keymaps): Make test less
brittle by using above new keymap.
Alan Third [Fri, 26 Nov 2021 12:54:07 +0000 (12:54 +0000)]
Add native HEIC support on macOS (bug#51381)
* lisp/image.el (image-type-header-regexps):
(image-type-file-name-regexps):
(image-type-auto-detectable): Add auto-detect code for heic.
* src/image.c (syms_of_image): Add heic as an image type under NS.
* src/nsimage.m (ns_can_use_native_image_api): Add heic to list of
possible image types in the native image support lookup.
Alan Third [Thu, 26 Aug 2021 18:25:48 +0000 (19:25 +0100)]
Allow resizing undecorated frames on macOS (bug#28512, bug#31795)
* src/nsterm.m (FRAME_DECORATED_FLAGS, FRAME_UNDECORATED_FLAGS):
Remove unused defines.
* src/nsterm.m ([EmacsWindow initWithEmacsFrame:fullscreen:screen:]):
Since this is now the only place these defines are used just put them
inline and add NSWindowStyleMaskResizable for undecorated frames on
Cocoa.
Alan Third [Wed, 25 Aug 2021 18:50:27 +0000 (19:50 +0100)]
Make NS toolbar item ID more unique (bug#50160)
* src/nsmenu.m
([EmacsToolbar addDisplayItemWithImage:idx:tag:labelText:helpText:enabled:]):
Add the label to the identifier to avoid collisions between toolbar
items that use the same image.
Alan Third [Sun, 22 Aug 2021 20:50:09 +0000 (21:50 +0100)]
Make NS toolbar use NSString instead of C strings
* src/nsfns.m ([NSString stringWithLispString:]): Ensure that the lisp
object is actually a string.
* src/nsmenu.m (update_frame_tool_bar): Convert to NSString instead of
C strings.
([EmacsToolbar addDisplayItemWithImage:idx:tag:labelText:helpText:enabled:]):
No need to convert to NSString here anymore.
Alan Third [Sat, 21 Aug 2021 18:39:39 +0000 (19:39 +0100)]
Fix macfont backend color handling
* src/macfont.m (get_cgcolor): Replace use of ns_lookup_indexed_color.
(CG_SET_FILL_COLOR_WITH_FACE_FOREGROUND):
(CG_SET_FILL_COLOR_WITH_FACE_BACKGROUND):
(CG_SET_STROKE_COLOR_WITH_FACE_FOREGROUND): Fix call to get_cgcolor
and fix all callers.
Alan Third [Sun, 15 Aug 2021 09:46:43 +0000 (10:46 +0100)]
Further cleanup of NS color code
* src/dispextern.h (FACE_COLOR_TO_PIXEL): Remove define and fix all
callers.
* src/nsterm.h (struct nsfont_info): Remove color_table.
* src/nsterm.m ([NSColor colorWithUnsignedLong:]): Always assume the
input contains the correct alpha value.
(ns_lookup_indexed_color):
(ns_index_color):
(ns_color_index_to_rgba): Remove functions and fix all callers.
(ns_query_color): No longer set pixel to the lookup table index,
always just set it to the ARGB integer value.
(ns_defined_color): Ignore makeindex as we no longer set pixel to the
lookup table index.
(ns_initialize_display_info):
(ns_redisplay_interface): Remove lookup table.
(ns_term_init): Fix the alpha setting.
thing
Alan Third [Sat, 14 Aug 2021 15:11:30 +0000 (16:11 +0100)]
Simplify NS color handling
* src/image.c (RGB_TO_ULONG):
(ARGB_TO_ULONG):
(RED_FROM_ULONG):
(RED16_FROM_ULONG):
(GREEN16_FROM_ULONG):
(BLUE16_FROM_ULONG): Define these here for NS too.
* src/nsfns.m (ns_set_foreground_color):
(ns_set_background_color): Use new EmacsColor methods.
* src/nsterm.h (struct ns_color_table): Replace this struct with a
built-in Objective C type.
(RGB_TO_ULONG):
(ARGB_TO_ULONG):
(ALPHA_FROM_ULONG):
(RED_FROM_ULONG):
(GREEN_FROM_ULONG):
(BLUE_FROM_ULONG):
(RED16_FROM_ULONG):
(GREEN16_FROM_ULONG):
(BLUE16_FROM_ULONG): These are no longer needed in the NS specific code.
(struct ns_display_info): Use an NSMutableArray instead of a custom struct.
* src/nsterm.m ([NSColor colorWithUnsignedLong:hasAlpha:]):
([NSColor unsignedLong]): New methods.
(ns_lookup_indexed_color):
(ns_index_color): Use the NSMutableArray lookup table.
(ns_term_init):
(ns_color_index_to_rgba):
(ns_query_color): Use the new EmacsColor methods.
(ns_initialize_display_info):
(ns_delete_display): Initialize and release the NSMutableArray lookup table.
Jonas Bernoulli [Wed, 22 Dec 2021 19:03:00 +0000 (20:03 +0100)]
Help outline-minor-mode avoid some false matches
* lisp/international/emoji.el (emoji--generate-file): Help
'outline-minor-mode' avoid false matches by quoting certain
characters when they appear at bol in a multi-line string.
Jonas Bernoulli [Wed, 22 Dec 2021 19:02:00 +0000 (20:02 +0100)]
Hide transient prefix/suffix commands from execute-extended-command
* lisp/international/emoji.el (emoji--define-transient): Hide
transient prefix/suffix commands from 'execute-extended-command'
by declaring that they should only be listed in the non-existent
'not-a-mode' mode.
Michael Albinus [Wed, 22 Dec 2021 17:13:18 +0000 (18:13 +0100)]
Fix some Tramp tests
* test/lisp/net/tramp-tests.el (tramp-test07-file-exists-p)
(tramp-test14-delete-directory, tramp-test29-start-file-process)
(tramp-test30-make-process): Adapt tests.
Mattias Engdegård [Wed, 22 Dec 2021 15:32:04 +0000 (16:32 +0100)]
Use unibyte strings in ntlm auth requests and responses
* lisp/net/ntlm.el (ntlm-build-auth-request)
(ntlm-build-auth-response): Make sure to use unibyte strings for bytes
greater than 127, or base64 encoding will fail.
This should fix failures in ntlm-tests.
Eli Zaretskii [Wed, 22 Dec 2021 14:24:56 +0000 (16:24 +0200)]
; * etc/NEWS: Fix a recently-added entry.
Lars Ingebrigtsen [Wed, 22 Dec 2021 14:19:41 +0000 (15:19 +0100)]
Adjust test after recent help.el change
Po Lu [Wed, 22 Dec 2021 13:36:00 +0000 (21:36 +0800)]
* src/pgtkterm.c (scroll_event): Fix scroll delta scale.
Po Lu [Wed, 22 Dec 2021 13:32:14 +0000 (21:32 +0800)]
* src/pgtkterm.c (scroll_event): Fix sign of delta_y.
Po Lu [Wed, 22 Dec 2021 10:37:31 +0000 (18:37 +0800)]
Disable by default and add NEWS entry to the new completion behavior
* etc/NEWS: Announce 'completion-auto-select'.
* lisp/simple.el (completion-auto-select): Default to nil.
Lars Ingebrigtsen [Wed, 22 Dec 2021 12:34:15 +0000 (13:34 +0100)]
Simplify disabled-command-function prompting
* lisp/novice.el (disabled-command-function): Use a prompt for
`read-event' instead of messaging it, so that people using
Emacspeak get the prompt read to them.
Lars Ingebrigtsen [Wed, 22 Dec 2021 12:00:55 +0000 (13:00 +0100)]
Use pop-to-buffer-same-window in `M-x term'
* lisp/term.el (term): Allow `display-buffer*' customization to
take effect (bug#52688).
Po Lu [Wed, 22 Dec 2021 09:29:27 +0000 (17:29 +0800)]
Fix horizontal scrolling on PGTK
* src/pgtkterm.c (scroll_event): Fix for when
`mwheel-coalesce-scroll-events' is nil.
Po Lu [Wed, 22 Dec 2021 03:13:23 +0000 (11:13 +0800)]
Use XI2 calls to warp the client pointer
* src/xfns.c (Fx_set_mouse_absolute_pixel_position):
* src/xterm.c (frame_set_mouse_pixel_position): Replace
calls to XWarpPointer with calls to XIWarpPointer with
the client pointer explictly specified. This avoids the
odd situation where the client pointer of the root window
is not the client pointer of the frame.
Po Lu [Wed, 22 Dec 2021 01:24:05 +0000 (09:24 +0800)]
Fix GTK crash when clicking on xwidgets on XI2
* src/xterm.c (handle_one_xevent): Drop button events destined
for an xwidget.
Paul Eggert [Tue, 21 Dec 2021 23:36:16 +0000 (15:36 -0800)]
Update from gnulib
Philip Kaludercic [Thu, 9 Dec 2021 16:36:14 +0000 (17:36 +0100)]
Delete completion window on quitting
* lisp/simple.el (completion-list-mode-map): Rebind
delete-completion-window over keyboard-quit.
Philip Kaludercic [Thu, 9 Dec 2021 16:26:14 +0000 (17:26 +0100)]
Allow for next-completion to wrap around the completion buffer
* lisp/simple.el (completion-wrap-movement): Add new option.
(previous-completion): Update docstring.
(next-completion): Respect completion-wrap-movement.
(switch-to-completions): Handle backwards completion by jumping to the
end of the buffer.
* lisp/minibuffer.el: (minibuffer-local-completion-map): Bind
minibuffer-complete to backtab
(completion--in-region-1): Handle backtab to scroll backwards
Philip Kaludercic [Thu, 9 Dec 2021 16:34:54 +0000 (17:34 +0100)]
Allow for the completion buffer to be automatically selected
* lisp/simple.el (completion-auto-select): Add new option.
(completion-setup-function): Respect completion-auto-select.
Eli Zaretskii [Tue, 21 Dec 2021 17:18:33 +0000 (19:18 +0200)]
; * src/xdisp.c (display_string): Fix a typo in a comment.
Stefan Kangas [Tue, 21 Dec 2021 17:04:33 +0000 (18:04 +0100)]
Declare functions to silence byte-compiler
* lisp/auth-source.el (gnutls-symmetric-decrypt, gnutls-ciphers):
* lisp/net/dbus.el (libxml-parse-xml-region):
* lisp/simple.el (thread-name):
* lisp/thread.el (thread-name, thread-signal, thread--blocker)
(current-thread, thread-live-p, all-threads):
* test/lisp/emacs-lisp/multisession-tests.el (sqlite-close):
* test/lisp/net/gnutls-tests.el (gnutls-symmetric-decrypt)
(gnutls-symmetric-encrypt, gnutls-hash-mac, gnutls-hash-digest)
(gnutls-ciphers, gnutls-digests, gnutls-macs):
* test/lisp/net/network-stream-tests.el (gnutls-peer-status):
* test/lisp/net/shr-tests.el (libxml-parse-html-region):
* test/src/decompress-tests.el (zlib-decompress-region):
* test/src/process-tests.el (thread-last-error, thread-join)
(make-thread):
* test/src/xml-tests.el (libxml-parse-xml-region): Declare
functions to silence byte-compiler in --without-all builds.
Stefan Kangas [Tue, 21 Dec 2021 17:01:23 +0000 (18:01 +0100)]
Fix some tests in --without-all builds
* test/lisp/image-tests.el (image-type/from-filename):
* test/src/image-tests.el (image-tests-init-image-library):
* test/src/thread-tests.el (threads-test-bug33073): Fix tests in
--without-all builds.
Stefan Kangas [Tue, 21 Dec 2021 14:56:33 +0000 (15:56 +0100)]
Silence additional byte-compiler warning in test
* test/lisp/emacs-lisp/eieio-tests/eieio-test-methodinvoke.el:
Silence byte-compiler.
Michael Albinus [Tue, 21 Dec 2021 14:15:16 +0000 (15:15 +0100)]
Add `permission-denied' error to Tramp
* lisp/net/tramp-compat.el (tramp-permission-denied): New defconst.
(tramp-compat-permission-denied): New defsubst.
* lisp/net/tramp.el (tramp-handle-access-file):
* lisp/net/tramp-archive.el (tramp-archive-handle-copy-file): Use it.
Po Lu [Tue, 21 Dec 2021 11:25:26 +0000 (19:25 +0800)]
Fix xg_event_is_scrollbar for grab-related events on XI2
* src/gtkutil.c (xg_event_is_for_scrollbar): Don't return true
if event coordinates are outside the frame on XInput 2.
Stefan Kangas [Tue, 21 Dec 2021 10:19:04 +0000 (11:19 +0100)]
; Fix spelling; be consistent with "key binding" (Bug#52674)
Mattias Engdegård [Tue, 21 Dec 2021 09:51:58 +0000 (10:51 +0100)]
Don't produce multibyte strings by accident in sasl-scram-rfc
* lisp/net/sasl-scram-rfc.el (sasl-scram--client-final-message):
The XOR of two unibyte strings should be a unibyte string.
This code previously worked by accident because of an overly tolerant
base64 encoder (bug#52670), but now causes a test failure.
Po Lu [Tue, 21 Dec 2021 07:02:37 +0000 (15:02 +0800)]
; * src/xterm.c (handle_one_xevent): Fix typo in last change.
Po Lu [Tue, 21 Dec 2021 06:58:44 +0000 (14:58 +0800)]
Ignore XI_TouchBegin events on the GTK tool bar
* src/xterm.c (handle_one_xevent): Ignore TouchBegin events
that target the tool bar.
Andrew G Cohen [Tue, 21 Dec 2021 05:47:44 +0000 (13:47 +0800)]
Fix gnus subject matching when subject is empty
* lisp/gnus/gnus-sum.el (gnus-summary-limit-include-thread): Don't try
to limit to a matching subject when the simplified subject is empty.
Lars Ingebrigtsen [Tue, 21 Dec 2021 04:25:50 +0000 (05:25 +0100)]
Revert "Speed up find_field when called from outside a field"
This reverts commit
4d8af56c76ee20bc8e1ebdeef5c4100cea005974.
This leads to lisp-mode-tests failures
Lars Ingebrigtsen [Mon, 20 Dec 2021 12:37:15 +0000 (13:37 +0100)]
Remove the `mode-line-percent-position' min width hack
* lisp/bindings.el (mode-line-position): Remove hack to get
min-width to work on the `mode-line-percent-position' bit.
* src/xdisp.c (display_string): Respect min-width in the non-Lisp
string case (bug#52332).
Lars Ingebrigtsen [Mon, 20 Dec 2021 09:45:51 +0000 (10:45 +0100)]
Allow @ characters in heredoc in shell-script-mode
* lisp/progmodes/sh-script.el (defconst): Also allow @ in heredoc
(bug#52496).
Lars Ingebrigtsen [Mon, 20 Dec 2021 09:29:50 +0000 (10:29 +0100)]
Use the new `permission-denied' error to catch multisession errors
* lisp/emacs-lisp/multisession.el (multisession--read-file-value):
Use the new `permission-denied' error to catch file errors on Windows.
Lars Ingebrigtsen [Mon, 20 Dec 2021 09:26:25 +0000 (10:26 +0100)]
Speed up find_field when called from outside a field
* src/editfns.c (find_field): Speed up the field functions when
called from outside a field (bug#52593). (In some cursory tests,
this makes the called-from-outside-a-field case about 3x faster.)
Stefan Monnier [Mon, 20 Dec 2021 16:04:37 +0000 (11:04 -0500)]
Fix bug#28557
* test/lisp/emacs-lisp/cconv-tests.el: Remove `:expected-result :failed`
from the bug#28557 tests.
(cconv-tests-cl-function-:documentation): Account for the presence of
the arglist (aka "usage") in the docstring.
* lisp/emacs-lisp/cl-macs.el (cl--transform-lambda):
* lisp/emacs-lisp/cl-generic.el (cl-defgeneric):
Handle non-constant `:documentation`.
* lisp/emacs-lisp/generator.el (iter-lambda):
* lisp/emacs-lisp/cconv.el (cconv--convert-funcbody):
Use `macroexp-parse-body`.
Po Lu [Tue, 21 Dec 2021 02:01:37 +0000 (10:01 +0800)]
Don't drop touch events we're not interested in on GTK3
* src/xterm.c (handle_one_xevent): Allow GTK to handle
unwanted TouchBegin events.
Po Lu [Tue, 21 Dec 2021 01:58:14 +0000 (09:58 +0800)]
Fix touch event menu bar detection
* src/xterm.c (handle_one_event): Don't drop menu bar touch
events.
Po Lu [Tue, 21 Dec 2021 01:52:05 +0000 (09:52 +0800)]
Fix xg_event_is_for_menubar for XI2 events
* src/gtkutil.c (xg_event_is_for_menubar): Use correct fields
for XI2 events.
* src/xterm.c (handle_one_event): Drop TouchBegin events we
know about.
Stefan Monnier [Tue, 21 Dec 2021 01:45:39 +0000 (20:45 -0500)]
eieio-tests.el: Silence last warnings
* test/lisp/emacs-lisp/eieio-tests/eieio-tests.el (eieio-tests--dummy):
New class.
(eieio-test-22-init-forms-dont-match-runnable): Tweak to silence warning.
Po Lu [Tue, 21 Dec 2021 01:43:23 +0000 (09:43 +0800)]
* src/xterm.c (handle_one_xevent): Set user time on touch events.
Po Lu [Tue, 21 Dec 2021 01:41:40 +0000 (09:41 +0800)]
Ignore all emulated button events (i.e. those from touchscreens)
* src/xterm.c (handle_one_xevent): Ignore all XIPointerEmulated
events if the display supports XI 2.2 or later.
Paul Eggert [Mon, 20 Dec 2021 23:03:33 +0000 (15:03 -0800)]
Put AM_V_GEN etc. first
With the recent changes to src/verbose.mk.in, it’s more important
to be consistent about putting AM_V_GEN and similar macros at the
start of a rule’s recipe, since ‘make’ now outputs the diagnostic
before it executes the recipe rather than the shell outputting it.
Most of the uses were already this way, but there were a few
outliers. Problem reported by Pip Cet.
* Makefile.in (${srcdir}/info/dir):
* admin/unidata/Makefile.in (${unidir}/charprop.el, ${unifiles})
(${unidir}/emoji-labels.el):
* lib/Makefile.in (libgnu.a, libegnu.a):
* lisp/Makefile.in (TAGS):
* src/Makefile.in (lisp.mk, Emacs):
* test/Makefile.in (%.log, $(test_module)):
Put AM_V_GEN and similar macros first.
Stefan Kangas [Mon, 20 Dec 2021 21:27:54 +0000 (22:27 +0100)]
; Minor license statement fixes
Stefan Kangas [Mon, 20 Dec 2021 21:12:25 +0000 (22:12 +0100)]
Make some variable aliases obsolete
* lisp/progmodes/make-mode.el (makefile-query-one-target-method):
* lisp/skeleton.el (skeleton-transformation, skeleton-filter):
* lisp/textmodes/artist.el (artist-text-renderer):
* lisp/textmodes/bibtex.el (bibtex-autokey-name-case-convert):
(bibtex-autokey-titleword-case-convert):
* lisp/textmodes/ispell.el (ispell-format-word):
* lisp/textmodes/sgml-mode.el (sgml-transformation):
* lisp/vc/add-log.el (change-log-time-zone-rule): Make variable
aliases obsolete.
Paul Eggert [Mon, 20 Dec 2021 20:14:07 +0000 (12:14 -0800)]
Prefer $(info) to @echo
Have GNU Make output some diagnostics directly, instead of forking
and execing a shell to do it.
* GNUmakefile (help):
* doc/lispref/two-volume.make (vol2.pdf, elisp2med-init)
(elisp2-init):
* doc/misc/Makefile.in (echo-info, echo-sources):
* lib-src/Makefile.in (archlibdir, install, check):
* src/verbose.mk.in (AM_V_AR, AM_V_CC, AM_V_CXX, AM_V_CCLD)
(AM_V_CXXLD, AM_V_ELC, AM_V_ELN, AM_V_GEN, AM_V_GLOBALS)
(AM_V_RC):
* test/Makefile.in (subdirs, subdir-targets):
Prefer $(info) to @echo.
* GNUmakefile (MAKECMDGOALS, configure, Makefile):
Prefer $(warning) to @echo >&2.
* src/verbose.mk.in (AM_V_ELN): Output target, like the others.
Mattias Engdegård [Mon, 20 Dec 2021 17:17:23 +0000 (18:17 +0100)]
Fix sloppy base64 acceptance of some multibyte characters
The base64 encoding functions incorrectly accepted some multibyte
characters; stop doing that (bug#52670).
* src/fns.c (base64_encode_1): Reject all multibyte characters.
* test/src/fns-tests.el (fns-tests-base64-encode-string)
(fns-test-base64url-encode-region)
(fns-test-base64url-encode-string): Add tests.
* doc/lispref/text.texi (Base 64): Rephrase outdated manual text.
* etc/NEWS: Add a notice.
Sam Steingold [Mon, 20 Dec 2021 18:22:42 +0000 (13:22 -0500)]
Fix build in a separate directory (bug#52669)
* src/lisp.h: Include <globals.h> instead of "globals.h"
Stefan Kangas [Mon, 20 Dec 2021 17:51:09 +0000 (18:51 +0100)]
Use defvar-keymap in wdired.el
* lisp/wdired.el (wdired-mode-map, wdired-perm-mode-map): Use
defvar-keymap.
Stefan Kangas [Mon, 20 Dec 2021 17:34:42 +0000 (18:34 +0100)]
Use declare-function instead of defun in eieio-tests.el
* test/lisp/emacs-lisp/eieio-tests/eieio-tests.el: Prefer
declare-function to defun.
Mattias Engdegård [Mon, 20 Dec 2021 16:29:17 +0000 (17:29 +0100)]
; * lisp/emacs-lisp/cl-macs.el (cl--self-tco): fix bootstrapping
Mattias Engdegård [Mon, 20 Dec 2021 16:13:09 +0000 (17:13 +0100)]
Silence byte-compiler warnings from absent optional features
* test/src/inotify-tests.el (inotify-rm-watch):
* test/src/lcms-tests.el (lcms-xyz->jch):
* test/src/sqlite-tests.el (sqlite-open):
Add declarations to prevent byte-compilation warnings when features
are absent.
Mattias Engdegård [Mon, 20 Dec 2021 10:59:22 +0000 (11:59 +0100)]
Body of dynamic let-bindings is not in tail position
This fixes a known bug in `named-let`.
* lisp/emacs-lisp/cl-macs.el (cl--self-tco): Prevent TCO from inside
dynamic variable bindings.
* test/lisp/emacs-lisp/cl-macs-tests.el (cl-macs--labels): Add test.
Mattias Engdegård [Sat, 11 Dec 2021 20:39:19 +0000 (21:39 +0100)]
Add `macroexp--dynamic-variable-p`
This predicate can be used for discriminating between lexically and
dynamically bound variables during macro-expansion (only).
It is restricted to internal use for the time being.
* lisp/emacs-lisp/bytecomp.el (byte-compile-initial-macro-environment):
Use macroexpand--all-toplevel.
* lisp/emacs-lisp/macroexp.el (macroexp-dynamic-variable-p): New.
(macroexp--expand-all): Maintain macroexp--dynvars.
(macroexpand-all): Rebind macroexp--dynvars.
(macroexpand--all-toplevel): New.
(internal-macroexpand-for-load): Use macroexpand--all-toplevel.
* src/eval.c (eval_sub): Transfer defvar declarations from
Vinternal_interpreter_environment into macroexp--dynvars during
lazy macro-expansion.
* src/lread.c (readevalloop): Rebind macroexp--dynvars around
read-and-evaluate operations.
(syms_of_lread): Define macroexp--dynvars.
* test/lisp/emacs-lisp/macroexp-resources/vk.el: New file.
* test/lisp/emacs-lisp/macroexp-tests.el (macroexp-tests--run-emacs)
(macroexp-tests--eval-in-subprocess)
(macroexp-tests--byte-compile-in-subprocess)
(macroexp--tests-dynamic-variable-p): Add tests.
Mattias Engdegård [Sun, 19 Dec 2021 11:38:17 +0000 (12:38 +0100)]
Treat base64 string encode/decode as pure functions
* lisp/emacs-lisp/byte-opt.el (side-effect-free-fns, pure-fns):
Mark base64-decode-string, base64-encode-string and
base64url-encode-string as pure and side-effect-free.
Stefan Kangas [Mon, 20 Dec 2021 14:54:56 +0000 (15:54 +0100)]
Silence byte-compiler using with-no-warnings in tests
We could silence the specific warnings by adding support for them to
with-suppressed-warnings, but it is almost not worth the complexity
for warnings that only show up in one file. In any case, it is not
urgent, so leave behind FIXMEs for now.
* test/lisp/emacs-lisp/eieio-tests/eieio-tests.el
(eieio-test-37-obsolete-name-in-constructor, class-c)
(eieio-test-01-mix-alloc-initarg, slotattr-class-base):
* test/lisp/progmodes/elisp-mode-tests.el
(xref-elisp-generic-co-located-default): Silence byte-compiler.
Stefan Kangas [Mon, 20 Dec 2021 14:25:23 +0000 (15:25 +0100)]
Silence undefined function warnings in eieio-tests.el
* test/lisp/emacs-lisp/eieio-tests/eieio-tests.el: Silence
byte-compiler with some function definitions. These are overridden by
class definitions further down.
Stefan Kangas [Mon, 20 Dec 2021 12:57:19 +0000 (13:57 +0100)]
Prefer skip-unless in one eieio test
* test/lisp/emacs-lisp/eieio-tests/eieio-tests.el
(eieio-test-01-mix-alloc-initarg): Use skip-unless to correctly mark
the test as skipped.
Stefan Kangas [Mon, 20 Dec 2021 12:51:06 +0000 (13:51 +0100)]
Silence byte-compiler in cconv-tests.el
* test/lisp/emacs-lisp/cconv-tests.el
(cconv-tests-iter-lambda-:documentation)
(cconv-tests-cl-function-:documentation): Silence byte-compiler.
Stefan Kangas [Mon, 20 Dec 2021 05:30:32 +0000 (06:30 +0100)]
Merge from origin/emacs-28
16ed9fad2c ; * doc/lispref/frames.texi (Child Frames): Improve wording.
f11b996a3c Clarify description of two mouse dragging parameters (Bug#...
Stefan Kangas [Sun, 19 Dec 2021 20:29:35 +0000 (21:29 +0100)]
* lisp/progmodes/sh-script.el (sh-mode-map): Use defvar-keymap.
Stefan Kangas [Sun, 19 Dec 2021 20:12:23 +0000 (21:12 +0100)]
; * lisp/progmodes/sh-script.el (sh-mode-menu): Fix typos.
Lars Ingebrigtsen [Sun, 19 Dec 2021 19:25:44 +0000 (20:25 +0100)]
Further tweaks to emoji person groups
* lisp/international/emoji.el (emoji--score): Don't take the bit
after the colon into consideration, like in "kiss: person, person,
light skin tone, medium-light skin tone".
Lars Ingebrigtsen [Sun, 19 Dec 2021 19:21:15 +0000 (20:21 +0100)]
Further tweaks to the emoji segmentation
* lisp/international/emoji.el (emoji--parse-emoji-test): Ensure
that we key off of the "person" variants, even if they come after
the gendered variations (which is the case for a handful of glyphs).
Lars Ingebrigtsen [Sun, 19 Dec 2021 18:53:04 +0000 (19:53 +0100)]
Further fixes for emojis in the "people" categories
* lisp/international/emoji.el (emoji--base-name): Get more derived
categories right.
Juri Linkov [Sun, 19 Dec 2021 17:47:36 +0000 (19:47 +0200)]
* lisp/isearch.el: Don't display "Pending" for lax and toggle commands.
* lisp/isearch.el (isearch-message-prefix): Display "Pending"
only when isearch-adjusted is 't' (bug#52356).
(isearch-define-mode-toggle):
Set isearch-adjusted to 'toggle' instead of 't'.
(isearch-search-fun-default):
Set isearch-adjusted to 'lax' instead of 't'.
Eli Zaretskii [Sun, 19 Dec 2021 17:27:41 +0000 (19:27 +0200)]
; * doc/lispref/frames.texi (Child Frames): Improve wording.
Martin Rudalics [Sun, 19 Dec 2021 16:59:15 +0000 (17:59 +0100)]
Clarify description of two mouse dragging parameters (Bug#52537)
* doc/lispref/frames.texi (Child Frames): Clarify description of
'top-visible' and 'bottom-visible' parameters (Bug#52537).
Eli Zaretskii [Sun, 19 Dec 2021 16:50:48 +0000 (18:50 +0200)]
Move Rmail autoloads to the common loaddefs.el
* lisp/mail/rmailsum.el:
* lisp/mail/rmailsort.el:
* lisp/mail/rmailmsc.el:
* lisp/mail/rmailmm.el:
* lisp/mail/rmailkwd.el:
* lisp/mail/rmailedit.el:
* lisp/mail/rmail.el: Remove generated-autoload-file setting and
don't require rmail-loaddefs.el
Lars Ingebrigtsen [Sun, 19 Dec 2021 16:12:18 +0000 (17:12 +0100)]
Add some very rudimentary field-beginning/end tests
Eli Zaretskii [Sun, 19 Dec 2021 15:44:32 +0000 (17:44 +0200)]
; Fix last change to filelock-tests.el
* test/src/filelock-tests.el (filelock-tests-file-locked-p-spoiled)
(filelock-tests-unlock-spoiled)
(filelock-tests-kill-buffer-spoiled): Expect 'permission-denied' only
on MS-Windows.
Eli Zaretskii [Sun, 19 Dec 2021 15:29:40 +0000 (17:29 +0200)]
New error symbol 'permission-denied'
* src/fileio.c (syms_of_fileio) <permission-denied>: Define the
symbol and its 'err-conditions' and 'error-message' properties.
(get_file_errno_data): Return permission-denied on EACCES.
* test/src/filelock-tests.el (filelock-tests-file-locked-p-spoiled)
(filelock-tests-unlock-spoiled)
(filelock-tests-kill-buffer-spoiled): Adapt the tests to the new
error symbol.
* doc/lispref/errors.texi (Standard Errors):
* etc/NEWS: Document 'permission-denied' error.
Stefan Kangas [Sun, 19 Dec 2021 15:09:32 +0000 (16:09 +0100)]
Make bad-packages-alist obsolete
* lisp/simple.el (bad-packages-alist, bad-package-check): Make
obsolete. (Bug#52351)
Alan Mackenzie [Sun, 19 Dec 2021 14:26:06 +0000 (14:26 +0000)]
CC Mode: Remove annoying background fontification. Should fix bug #52298
Partially revert the commits from 2021-10-24 - 2021-10-26, "CC Mode: Fontify
"found types" which are recognized after being first scanned".
This removes the background fontification which ran off of a 0.1s timer, but
leaves the facility of normal fontification causing the fontification
throughout the buffer of newly found types.
* lisp/progmodes/cc-fonts.el (c-find-types-background)
(c-type-finder-timer-func): Remove.
* lisp/progmodes/cc-mode.el (c-type-finder-timer, c-inhibit-type-finder)
(c-type-finder-pos, c-post-gc-hook): Remove.
(c-leave-cc-mode-mode): Remove the manipulations of c-type-finder-timer and
c-post-gc-hook.
(c-basic-common-init): Remove the manipulations of c-type-finder-pos,
c-type-finder-timer, and c-post-gc-hook.
* lisp/progmodes/cc-vars.el (c-type-finder-time-slot)
(c-type-finder-repeat-time, c-type-finder-chunk-size): Remove.
* doc/misc/cc-mode.texi (Found Types): Remove. Amend some menu entries.
Stefan Kangas [Sun, 19 Dec 2021 14:26:36 +0000 (15:26 +0100)]
Silence "initform needs quoting" warning in tests
* test/lisp/emacs-lisp/eieio-tests/eieio-test-persist.el
(persist-simple):
* test/lisp/emacs-lisp/eieio-tests/eieio-tests.el (class-a)
(class-c, inittest, slotattr-base, slotattr-ok)
(slotattr-class-base, slotattr-class-ok, IT): Silence byte-compiler
warnings about "ambiguous initform needs quoting".
Michael Albinus [Sun, 19 Dec 2021 14:21:26 +0000 (15:21 +0100)]
Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs
Michael Albinus [Sun, 19 Dec 2021 14:21:06 +0000 (15:21 +0100)]
Fix timeout problem in autorevert-tests.el
* test/lisp/autorevert-tests.el (auto-revert-test05-global-notify):
Remove debug message. Increase timeout.
Kévin Le Gouguec [Sun, 19 Dec 2021 13:58:41 +0000 (14:58 +0100)]
Enable webp support in PGTK builds, too
* configure.ac (HAVE_WEBP): Enable webp in PGTK builds, too.
Eli Zaretskii [Sun, 19 Dec 2021 13:48:30 +0000 (15:48 +0200)]
Fix last change in 'handle_display_prop'
* src/xdisp.c (handle_display_prop): Pass the window's buffer to
'display_min_width' and to 'handle_display_spec'. (Bug#52385)
Stefan Kangas [Sun, 19 Dec 2021 13:45:55 +0000 (14:45 +0100)]
Silence "Unknown slot" warnings in tests
* test/lisp/emacs-lisp/eieio-tests/eieio-tests.el:
* test/lisp/net/ntlm-tests.el: Silence byte-compiler.
Daniel Mendler [Sun, 19 Dec 2021 13:21:50 +0000 (14:21 +0100)]
Add a new elp-restore-package command
* lisp/emacs-lisp/elp.el (elp-restore-package): New command
(bug#52457).
Lars Ingebrigtsen [Sun, 19 Dec 2021 13:20:15 +0000 (14:20 +0100)]
Fix elp-*-list interactive specs
* lisp/emacs-lisp/elp.el (elp-reset-list):
(elp-restore-list): Fix the interactive specs (bug#52457).
Stefan Kangas [Sun, 19 Dec 2021 13:02:30 +0000 (14:02 +0100)]
Merge from origin/emacs-28
5f25852e91 Update to Org 9.5.1-31-ga18849
Lars Ingebrigtsen [Sun, 19 Dec 2021 12:44:21 +0000 (13:44 +0100)]
Rework how shr sets <span id='foo'> targets to make it more reliable
* lisp/net/eww.el (eww-display-html): The target is now a list.
* lisp/net/shr.el (shr--link-targets): New variable.
(shr-insert-document): Set the targets.
(shr-descend): Save targets and apply them later.
(shr-ensure-paragraph): Remove hack to avoid filling from removing
targets.
(shr-tag-a): Save targets for later.
(shr-render-td-1): Bind and set targets (bug#52512).
Lars Ingebrigtsen [Sun, 19 Dec 2021 12:02:53 +0000 (13:02 +0100)]
Fix prompt in `sql-sqlite'
* lisp/progmodes/sql.el (sql-get-login): Fix the Database: prompt
(bug#52546).
Lars Ingebrigtsen [Sun, 19 Dec 2021 11:46:01 +0000 (12:46 +0100)]
Fix indexing gendered emoji forms that have "person" base forms
* lisp/international/emoji.el (emoji--base-name): Index man/woman
on the generic form we have read already (bug#52580).
LdBeth [Sun, 19 Dec 2021 11:26:15 +0000 (12:26 +0100)]
Add a shr-allowed-images user option
* lisp/net/shr.el (shr-allowed-images): New variable (bug#52594).
(shr-image-is-blocked): New function to use it.
(shr-tag-img): Use it.
* doc/misc/eww.texi (Advanced): Document it.
Copyright-paperwork-exempt: yes
miha [Sun, 19 Dec 2021 11:02:11 +0000 (12:02 +0100)]
Fix prompt colors in comint-snapshot-last-prompt
* lisp/comint.el (comint-snapshot-last-prompt): Fix colorization
of the prompt (bug#11883).
Lars Ingebrigtsen [Sun, 19 Dec 2021 10:49:46 +0000 (11:49 +0100)]
Move rmail-related functions from gnus-util.el to gnus-rmail.el
* lisp/gnus/gnus-rmail.el: New file with rmail-related functions
moved from gnus-util.el.
* lisp/gnus/gnus-util.el: Move the rmail-related functions to its
own file. This avoids loading rmail.el when something requires
gnus-util.el.